<template>
  <div id="Home">
    <div class="outer">
      <h2 style="width: 100%;text-align: center;background-color: #66afe9;">Home</h2>
      <div>
        <h2>新闻板块</h2>
        <div><router-link to="/home/news"><button>news</button></router-link></div>
      </div>
      <div>
        <h2>音乐板块</h2>
        <div><router-link to="/home/music/1"><button>华语乐坛</button></router-link></div>
        <div><router-link :to="{name:'music',params:{id:'2'}}"><button>欧美流行</button></router-link></div>
        <!--    路由的第二种写法-->
        <div><router-link :to="{path:'/home/music/3'}"><button>日语流行</button></router-link></div>
      </div>
      <div>
        <h2>游戏板块</h2>
        <div><router-link to="/home/game?tit=QQ飞车&version=2021"><button>QQ飞车</button></router-link></div>
        <div><router-link :to="{name:'game',query:{tit:'英雄联盟',version:'12.14'}}"><button>英雄联盟</button></router-link></div>
      </div>
    </div>
    <div class="content">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "Home"
}
</script>

<style scoped>
#Home{
  display: flex;
  width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.outer{
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}
.content{
  margin-top: 20px;
  width: 800px;
  background-color: pink;
}
</style>